package com.hhl.api.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class IndexController {
    @Value("${userName}")
    private String userName;

    @RequestMapping("/getName")
    private String name() {
        return userName==null?"没有获取sss到值":userName;
    }

}

